import 'package:first/randow/RandomWords.dart';
import 'package:first/shop/Car.dart';
import 'package:first/study/StudyAll.dart';
import 'package:flutter/material.dart';
import 'package:english_words/english_words.dart';

import 'package:first/router.dart';
import 'package:provide/provide.dart';


//路由导航
void main() {
  FluroRouter.setupRouter();
  runApp(MyApp());
}

class MyApp extends StatelessWidget {

  

  @override
  Widget build(BuildContext context) {
    return ProviderNode(
        child: MaterialApp(
          title: 'Fluro study',
          initialRoute: 'login',
          onGenerateRoute: FluroRouter.router.generator,
        ),
        providers: null);
  }
}


//void main() => runApp(Shopping());
//
//class Shopping extends StatelessWidget {
//  @override
//  Widget build(BuildContext context) {
//    // TODO: implement build
//    return new MaterialApp(
//      debugShowCheckedModeBanner: false,
//      title: 'Shopping App',
//      theme: new ThemeData(
//        primaryColor: Colors.white,
//      ),
//      home: new ShoppingList(
//        products: <Product>[
//          new Product(name: 'Eggs'),
//          new Product(name: 'Flour'),
//          new Product(name: 'Chocolate chips'),
//        ],
//      ),
//    );
//  }
//}
//
//
//class MyApp extends StatelessWidget {
//  @override
//  Widget build(BuildContext context) {
//    final wordPair = new WordPair.random();
//    return new MaterialApp(
//      title: 'Study Flutter',
//      theme: new ThemeData(
//        primaryColor: Colors.white,
//      ),
//      home: new Scaffold(
//        appBar: new AppBar(
//          title: new Text('Study Flutter'),
//          centerTitle: true,
//        ),
//        body: new Container(
//          color: Colors.white,
////          child: new Text('Hello World'),
////          child: new Text(wordPair.asPascalCase),
//          child: new Counter(),
//          ),
//      ),
//    );
//  }
//}
//
//class CounterDisplay extends StatelessWidget {
//  CounterDisplay({this.count});
//
//  final int count;
//
//  @override
//  Widget build(BuildContext context) {
//    return new Text('Count: $count');
//  }
//}
//
//class CounterIncrementor extends StatelessWidget {
//  CounterIncrementor({this.onPressed});
//
//  final VoidCallback onPressed;
//
//  @override
//  Widget build(BuildContext context) {
//    return new RaisedButton(
//      onPressed: onPressed,
//      child: new Text('Increment'),
//    );
//  }
//}
//
//class Counter extends StatefulWidget {
//  @override
//  _CounterState createState() => new _CounterState();
//}
//
//class _CounterState extends State<Counter> {
//  int _counter = 0;
//
//  void _increment() {
//    setState(() {
//      ++_counter;
//    });
//  }
//
//  @override
//  Widget build(BuildContext context) {
//    return new Row(children: <Widget>[
//      new CounterIncrementor(onPressed: _increment),
//      new CounterDisplay(count: _counter),
//    ]);
//  }
//}